<template>
  <div
    class="vlonRichText"
    v-if="oItem"
    :style="{
      paddingTop: oItem.main.contentPaddingTop + 'px',
      paddingBottom: oItem.main.contentPaddingBottom + 'px',
      paddingLeft: oItem.main.contentPaddingLR + 'px',
      paddingRight: oItem.main.contentPaddingLR + 'px',
    }"
  >
    <div
      class="content"
      v-html="oItem.main.textareaContent"
      :style="{
        backgroundColor: oItem.main.contentBgColor,
        padding: oItem.main.contentInnerPadding + 'px',
        borderTopLeftRadius: oItem.main.contentBorderRadiusTop + 'px',
        borderTopRightRadius: oItem.main.contentBorderRadiusTop + 'px',
        borderBottomLeftRadius: oItem.main.contentBorderRadiusBottom + 'px',
        borderBottomRightRadius: oItem.main.contentBorderRadiusBottom + 'px',
      }"
    ></div>
  </div>
</template>
<script>
import { mapState } from "vuex";
export default {
  name: "vlonRichText",
  data() {
    return {
      oItem: null,
    };
  },
  created() {},
   props: ["item", "ename", "id"],
  components: {},
  mounted() {
    this.$nextTick(() => {
      this.init();
    });
   
  },
  methods: {
    //页面初始化
    init() {
      this.oItem = null;
      this.oItem = JSON.parse(JSON.stringify(this.item));
    },
  },
  computed: mapState(["decorate"]),
  watch: {},
};
</script>
<style scoped lang="scss">
.vlonRichText {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  .content {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    word-break: break-all;
    word-wrap: break-word;
  }
}
</style>
<style lang="scss">
.vlonRichText {
  .content {
    img {
      max-width: 100%;
    }
    a {
      color: #0079fe;
    }
  }
}
</style>
